package com.voicechat.firstmet.net.service;

import com.voicechat.firstmet.bean.TimeRecomBean;
import com.voicechat.firstmet.bean.VoiceChatAllBean;
import com.voicechat.firstmet.net.Params;

import rx.Observable;

/**
 * @ProjectName: FirstMet
 * @Package: com.voicechat.firstmet.net.service
 * @ClassName: CommunityService
 * @Description: 语聊service
 * @Author: ljp
 * @CreateDate: 2018/10/9 13:41
 * @Version: 1.0
 */
public class VoiceChatService extends BaseService {
    /**
     * @method
     * @description 语聊实时推荐请求
     * @date: 2018/10/19 16:42
     * @author: ljp
     * @return
     */
    public static Observable<TimeRecomBean> voiceChatTime(String token, String equipmentId,String userId) {
        Params params = new Params();
        params.put("userId",userId);
        params.put("token", token);
        params.put("equipmentId", equipmentId);
        return sNetInterface.voiceChatTimeList(params).compose(applySchedulers());
    }
    /**
    * @method
    * @description 语聊全部请求
    * @date: 2018/10/19 16:42
    * @author: ljp
    * @return
    */
    public static Observable<VoiceChatAllBean> voiceChatAll(String token, String equipmentId,String page,String userId) {
        Params params = new Params();
        params.put("userId",userId);
        params.put("token", token);
        params.put("equipmentId", equipmentId);
        params.put("pageNo", page);
        params.put("pageSize", 10);//一页返回多少条数据 默认10
        return sNetInterface.voiceChatList(params).compose(applySchedulers());
    }
    /**
     * @method
     * @description 语聊人气请求
     * @date: 2018/10/19 16:42
     * @author: ljp
     * @return
     */
    public static Observable<VoiceChatAllBean> voiceChatHitsList(String token, String equipmentId, String page,String userId) {
        Params params = new Params();
        params.put("userId",userId);
        params.put("token", token);
        params.put("equipmentId", equipmentId);
        params.put("pageNo", page);
        params.put("pageSize", 10);//一页返回多少条数据 默认10
        return sNetInterface.voiceChatHitsList(params).compose(applySchedulers());
    }
    /**
     * @method
     * @description 语聊新人请求
     * @date: 2018/10/19 16:42
     * @author: ljp
     * @return
     */
    public static Observable<VoiceChatAllBean> voiceChatNewList(String token, String equipmentId, String page,String userId) {
        Params params = new Params();
        params.put("userId",userId);
        params.put("token", token);
        params.put("equipmentId", equipmentId);
        params.put("pageNo", page);
        params.put("pageSize", 10);//一页返回多少条数据 默认10
        return sNetInterface.voiceChatNewList(params).compose(applySchedulers());
    }

}
